<%--
  Created by IntelliJ IDEA.
  User: ghost
  Date: 2019/12/8
  Time: 19:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<%
    String username = (String) session.getAttribute("username");
    String flag = (String) session.getAttribute("flag");
    if(username != null){
        session.setAttribute("pageNo",1);
        response.sendRedirect("studentinfo.jsp");
    }else if(flag != null){
        out.print("<script>alert('"+flag+"')</script>");
    }
%>
<form action="doLogin.jsp" method="post">
    <table>
        <tr><td>用户名：</td><td><input type="text" name="username"required></td></tr>
        <tr><td>密码：</td><td><input type="password" name="password" required></td></tr>
        <tr><td colspan="1"><input type="submit" value="登录"></td></tr>
    </table>
</form>
</body>
</html>
